JavaScript Web & Mobile Deployments

The following Properties of the Hierarchy object enable access to the hierarchy data using the JavaScript Web Deployment:

The following example adds up the 'cost' for all 'Parts_List' items generated by the Hierarchy

@Dim node:N
@Assign TotalCost = 0
@For node = 1 to hierarchy.count
@If hierarchy.item(node).baseClass = 'Parts_List'
  @Assign TotalCost =TotalCost + hierarchy.item(node).cost
@Endif
@Next

The following example displayes the Node's Object names, value & Description:

@Dim node:N
@For n = 1 to hierarchy.count
  @Debug Hierarchy.item(node).name+'='+ Hierarchy.item(node) + '  (' + Hierarchy.item(node).vDescription  + ') '
@Next